package com.yizhi.student.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.yizhi.student.dao.StudentInfoDao;
import com.yizhi.student.domain.StudentInfoDO;
import com.yizhi.student.service.StudentInfoService;



@Service
public class StudentInfoServiceImpl  implements StudentInfoService {

	@Autowired
	private StudentInfoDao studentInfoDao;
	
	@Override
	public StudentInfoDO get(Integer id){
		System.out.println("======service层中传递过来的id参数是：" + id + "======");
		return studentInfoDao.get(id);
	}

//// [{currPage=1, pageSize=10, name=, tocollegeId=2, tomajorId=, classId=}]
//	@Override
//	public List<StudentInfoDO> list(Map<String, Object> map){
//		Object currPage = map.get("currPage");
//		Object pageSize=map.get("pageSize");
//		Object name=map.get("name");
//		Object tocollegeId=map.get("tocollegeId");
//		Object tomajorId=map.get("tomajorId");
//		Object classId=map.get("classId");
//		return studentInfoDao.list(currPage,pageSize,name,tocollegeId,tocollegeId,tomajorId,classId);
//	}
	@Override
	public List<StudentInfoDO> list(StudentInfoDO studentInfoDO){
		return studentInfoDao.list(studentInfoDO);
	}

	//"===================================================================================="
	@Override
	public int count(Map<String, Object> map){
		return studentInfoDao.count(map);
	}
	
	@Override
	public int save(StudentInfoDO studentInfo){
		return studentInfoDao.save(studentInfo);
	}
	
	@Override
	public int update(StudentInfoDO studentInfo){
		return studentInfoDao.update(studentInfo);
	}
	
	@Override
	public int remove(Integer id){
		return studentInfoDao.remove(id);
	}
	
	@Override
	public int batchRemove(Integer[] ids){
		return studentInfoDao.batchRemove(ids);
	}
	
}
